<form action="/backend/news/<?php echo isset($news) ? 'update' : 'insert'; ?>" method="post">
    <input type="hidden" name="id" value="<?php echo isset($news) ? $news->id : '0'; ?>"/>


	<div class="form-row">
		<label>创建时间</label>
		<input type="text" name="created_at" value="<?php echo isset($news) ? $news->created_at : ''; ?>"/>
	</div>

    <div class="form-row">
		<label for="category">新闻分类</label>
		<select name="category">
			<?php foreach ($categories as $category): ?>
				<option value="<?php echo $category->id; ?>"<?php echo $category->id == (isset($news) ? $news->category : 0) ? ' selected="selected"' : ''; ?>>
					<?php echo $category->name; ?>
				</option>
			<?php endforeach; ?>
		</select>
    </div>

    <div class="form-row">
		<label for="home_cover">首页显示图片</label>
		<input type="text" name="home_cover" value="<?php echo isset($news) ? $news->home_cover : '0'; ?>"/>
    </div>
    <div class="form-row list-image">
		<label for="list_cover">列表页显示图片</label>
		<input type="text" name="list_cover" value="<?php echo isset($news) ? $news->list_cover : '0'; ?>"/>
    </div>
	<ul class="tab-button">
		<li><a href="javascript:void(0);">french</a></li>
		<li><a href="javascript:void(0);">中文</a></li>
		<li><a href="javascript:void(0);">english</a></li>
	</ul>

	<div class="tab-content">
		<div class="form-row">
			<label for="title_fr">标题（法文）</label>
			<input type="text" name="title_fr" class="text" value="<?php echo isset($news) ? $news->title_fr : ''; ?>"/>
		</div>

		<div class="form-row content">
			<textarea name="content_fr" id="content_fr"><?php echo isset($news) ? $news->content_fr : ''; ?></textarea>
		</div>

		<div class="form-row">
			<label for="labels_fr">标签（法文）</label>
			<input type="text" name="labels_fr" class="text" value="<?php echo isset($news) ? $news->labels_fr : ''; ?>"/>
		</div>
	</div>
	<div class="tab-content">
		<div class="form-row">
			<label for="title_zh">标题（中文）</label>
			<input type="text" name="title_zh" class="text" value="<?php echo isset($news) ? $news->title_zh : ''; ?>"/>
		</div>

		<div class="form-row content">
			<textarea name="content_zh" id="content_zh"><?php echo isset($news) ? $news->content_zh : ''; ?></textarea>
		</div>

		<div class="form-row">
			<label for="labels_zh">标签（中文）</label>
			<input type="text" name="labels_zh" class="text" value="<?php echo isset($news) ? $news->labels_zh : ''; ?>"/>
		</div>
	</div>
	<div class="tab-content">
		<div class="form-row">
			<label for="title_en">标题（英文）</label>
			<input type="text" name="title_en" class="text" value="<?php echo isset($news) ? $news->title_en : ''; ?>"/>
		</div>

		<div class="form-row content">
			<textarea name="content_en" id="content_en"><?php echo isset($news) ? $news->content_en : ''; ?></textarea>
		</div>

		<div class="form-row">
			<label for="labels_en">标签（英文）</label>
			<input type="text" name="labels_en" class="text" value="<?php echo isset($news) ? $news->labels_en : ''; ?>"/>
		</div>
	</div>
    <div class="form-button">
		<input type="submit" name="submit" class="submit" value="提交"/>
    </div>
</form>